import request from '/@/utils/request';
export function commApi() {
	return {
		upload: (data) => {
			return request({
				url: '/comm/upload',
				method: 'post',
				headers: { 'Content-Type': 'multipart/form-data' },
                data
			});
		},
		getMenu: () => {
			return request({
				url: '/comm/menus',
				method: 'get'
			});
		},
		getButtonAuth: () => {
			return request({
				url: '/comm/button',
				method: 'get'
			});
		},
		getPlats: (params) => {
			return request({
				url: '/comm/plats',
				method: 'get',
				params
			});
		},
		// getTongji: (params) => {
		// 	return request({
		// 		url: '/comm/tongji',
		// 		method: 'get',
		// 		params
		// 	});
		// },
		getTongjiCount: (params) => {
			return request({
				url: '/comm/count',
				method: 'get',
				params
			});
		},
		getTongjiLine: (params) => {
			return request({
				url: '/comm/line_chart',
				method: 'get',
				params
			});
		},
		getTongjiRound: (params) => {
			return request({
				url: '/comm/round_chart',
				method: 'get',
				params
			});
		},
		getTongjiPlatform: (params) => {
			return request({
				url: '/comm/plat_form_chart',
				method: 'get',
				params
			});
		},
		getTongjiCompany_pay: (params) => {
			return request({
				url: '/comm/company_pay',
				method: 'get',
				params
			});
		},
		getTongjiUatype: (params) => {
			return request({
				url: '/statistics/systemType',
				method: 'get',
				params
			});
		},
		getCombo: (params) => {
			return request({
				url: '/comm/combo',
				method: 'get',
				params
			});
		},
		getCompanyList: (params) => {
			return request({
				url: '/comm/company_list',
				method: 'get',
				params
			});
		},
		plugins: (params) => {
			return request({
				url: '/comm/plugins/index',
				method: 'get',
				params
			});
		},
		pluginsEdit: (data) => {
			return request({
				url: '/comm/plugins/edit',
				method: 'post',
				data
			});
		},
	};
}